export const LIST_TYPE = {
    TRIAL: '1', // 试用中
    INFORMAL: '2', // 待转正
    RECORD: '3' // 历史记录
};

export const TRIAL_STATUS = {
    GUIDE: 1, // 新员工引导
    ASSESS_WEEK: 2, // 周评
    ASSESS_MONTH: 3, // 月评
    ASSESS_QUARTER: 4, // 季评
    INTERVIEW_WEEK: 5, // 周评访谈
    INTERVIEW_MONTH: 6, // 月评访谈
    INTERVIEW_QUARTER: 7, // 季评访谈
    TRIAL_DONE: 8, // 试用终止
    ASSESSING: 9 // 试用中
};

export const TRIAL_STATUS_LABEL_LIST = [
    '',
    '新员工引导',
    '周评',
    '月评',
    '季评',
    '周评访谈',
    '月评访谈',
    '季评访谈',
    '试用终止',
    '试用中'
];

export const TRIAL_STATUS_LIST = Object.values(TRIAL_STATUS).map(item => ({
    text: TRIAL_STATUS_LABEL_LIST[item],
    value: item
}));

// 操作状态
export const TRIAL_ACTION = {
    GUIDE_HR: 'guideHr', // 人事引导
    GUIDE_TEACHER: 'guideTeacher', // 带教引导
    GUIDE_LEADER: 'guideLeader', // 主管引导
    GUIDE_COMPLETE: 'guideComplete', // 引导完成
    ASSESS_TEACHER_WEEK: 'assessTeacherW', // 带教人周评
    ASSESS_LEADER_WEEK: 'assessLeaderW', // 主管周评
    ASSESS_HR_WEEK: 'assessHRW', // 人事周评
    WEEK_COMPLETE: 'weeklyComplete', // 周评完成
    ASSESS_TEACHER_MONTH: 'assessTeacherM', // 带教人月评
    ASSESS_LEADER_MONTH: 'assessLeaderM', // 主管月评
    ASSESS_HR_MONTH: 'assessHRM', // 人事月评
    MONTH_COMPLETE: 'monthlyComplete', // 月评完成
    ASSESS_TEACHER_QUARTER: 'assessTeacherQ', // 带教人季评
    ASSESS_LEADER_QUARTER: 'assessLeaderQ', // 主管季评
    ASSESS_HR_QUARTER: 'assessHRQ', // 人事季评
    QUARTER_COMPLETE: 'quarterlyComplete', // 季评完成
    INTERVIEW_READY_WEEK: 'interviewReadyW', // 面谈准备-周
    INTERVIEW_LOG_WEEK: 'interviewLogW', // 面谈待记录-周
    INTERVIEW_SUMMARY_WEEK: 'interviewSummaryW', // 面谈待总结-周
    INTERVIEW_DETAIL_WEEK: 'interviewDetailW', // 面谈完成-周
    INTERVIEW_READY_MONTH: 'interviewReadyM', // 面谈准备-月
    INTERVIEW_LOG_MONTH: 'interviewLogM', // 面谈待记录-月
    INTERVIEW_SUMMARY_MONTH: 'interviewSummaryM', // 面谈待总结-月
    INTERVIEW_DETAIL_MONTH: 'interviewDetailM', // 面谈完成-月
    INTERVIEW_READY_QUARTER: 'interviewReadyQ', // 面谈准备-季
    INTERVIEW_LOG_QUARTER: 'interviewLogQ', // 面谈待记录-季
    INTERVIEW_SUMMARY_QUARTER: 'interviewSummaryQ', // 面谈待总结-季
    INTERVIEW_DETAIL_QUARTER: 'interviewDetailQ', // 面谈完成-季
    TRIAL_DONE: 'probationTerminate', // 面谈结论终止试用
    PASS_OLD: 'approvalPassOld' // 面谈结论终止试用
};

// 状态与操作的匹配
export const STATUS_ACTION = {
    [TRIAL_STATUS.GUIDE]: [
        TRIAL_ACTION.GUIDE_HR,
        TRIAL_ACTION.GUIDE_TEACHER,
        TRIAL_ACTION.GUIDE_LEADER,
        TRIAL_ACTION.GUIDE_COMPLETE
    ],
    [TRIAL_STATUS.ASSESS_WEEK]: [
        TRIAL_ACTION.ASSESS_TEACHER_WEEK,
        TRIAL_ACTION.ASSESS_LEADER_WEEK,
        TRIAL_ACTION.ASSESS_HR_WEEK,
        TRIAL_ACTION.WEEK_COMPLETE
    ],
    [TRIAL_STATUS.ASSESS_MONTH]: [
        TRIAL_ACTION.ASSESS_TEACHER_MONTH,
        TRIAL_ACTION.ASSESS_LEADER_MONTH,
        TRIAL_ACTION.ASSESS_HR_MONTH,
        TRIAL_ACTION.MONTH_COMPLETE
    ],
    [TRIAL_STATUS.ASSESS_QUARTER]: [
        TRIAL_ACTION.ASSESS_TEACHER_QUARTER,
        TRIAL_ACTION.ASSESS_LEADER_QUARTER,
        TRIAL_ACTION.ASSESS_HR_QUARTER,
        TRIAL_ACTION.QUARTER_COMPLETE
    ],
    [TRIAL_STATUS.INTERVIEW_WEEK]: [
        TRIAL_ACTION.INTERVIEW_READY_WEEK,
        TRIAL_ACTION.INTERVIEW_LOG_WEEK,
        TRIAL_ACTION.INTERVIEW_SUMMARY_WEEK,
        TRIAL_ACTION.INTERVIEW_DETAIL_WEEK
    ],
    [TRIAL_STATUS.INTERVIEW_MONTH]: [
        TRIAL_ACTION.INTERVIEW_READY_MONTH,
        TRIAL_ACTION.INTERVIEW_LOG_MONTH,
        TRIAL_ACTION.INTERVIEW_SUMMARY_MONTH,
        TRIAL_ACTION.INTERVIEW_DETAIL_MONTH
    ],
    [TRIAL_STATUS.INTERVIEW_QUARTER]: [
        TRIAL_ACTION.INTERVIEW_READY_QUARTER,
        TRIAL_ACTION.INTERVIEW_LOG_QUARTER,
        TRIAL_ACTION.INTERVIEW_SUMMARY_QUARTER,
        TRIAL_ACTION.INTERVIEW_DETAIL_QUARTER
    ],
    [TRIAL_STATUS.TRIAL_DONE]: [TRIAL_ACTION.TRIAL_DONE],
    [TRIAL_STATUS.ASSESSING]: ['assessing']
};

// 操作状态列表
export const TRIAL_ACTION_LIST = [
    {
        title: '人事引导',
        tip: '人事引导',
        icon: 'renshiyindao',
        value: TRIAL_ACTION.GUIDE_HR
    },
    {
        title: '带教引导',
        tip: '带教引导',
        icon: 'daijiaoyindao',
        value: TRIAL_ACTION.GUIDE_TEACHER
    },
    {
        title: '主管引导',
        tip: '主管引导',
        icon: 'zhuguanyindao',
        value: TRIAL_ACTION.GUIDE_LEADER
    },
    {
        title: '引导完成',
        tip: '引导完成',
        value: TRIAL_ACTION.GUIDE_COMPLETE
    },
    // 周评
    {
        title: '带教人周评',
        status: '带教周评',
        tip: '带教人周评中',
        icon: 'daijiaorenzhouping',
        value: TRIAL_ACTION.ASSESS_TEACHER_WEEK
    },
    {
        title: '主管周评',
        tip: '主管周评中',
        icon: 'zhuguanzhouping',
        value: TRIAL_ACTION.ASSESS_LEADER_WEEK
    },
    {
        title: '人事周评',
        tip: '人事负责人周评中',
        icon: 'hrzhouping',
        value: TRIAL_ACTION.ASSESS_HR_WEEK
    },
    {
        title: '周评完成',
        tip: '周评完成',
        value: TRIAL_ACTION.WEEK_COMPLETE
    },
    // 月评
    {
        title: '带教人月评',
        status: '带教月评',
        tip: '带教人月评中',
        icon: 'daijiaorenyueping',
        value: TRIAL_ACTION.ASSESS_TEACHER_MONTH
    },
    {
        title: '主管月评',
        tip: '主管月评中',
        icon: 'zhuguanyueping',
        value: TRIAL_ACTION.ASSESS_LEADER_MONTH
    },
    {
        title: '人事月评',
        tip: '人事负责人月评中',
        icon: 'hryueping',
        value: TRIAL_ACTION.ASSESS_HR_MONTH
    },
    {
        title: '月评完成',
        tip: '月评完成',
        value: TRIAL_ACTION.MONTH_COMPLETE
    },
    // 季评
    {
        title: '带教人季评',
        status: '带教季评',
        tip: '带教人季评中',
        icon: 'daijiaorenjiping',
        value: TRIAL_ACTION.ASSESS_TEACHER_QUARTER
    },
    {
        title: '主管季评',
        tip: '主管季评中',
        icon: 'zhuguanjiping',
        value: TRIAL_ACTION.ASSESS_LEADER_QUARTER
    },
    {
        title: '人事季评',
        tip: '人事负责人季评中',
        icon: 'renshijiping',
        value: TRIAL_ACTION.ASSESS_HR_QUARTER
    },
    {
        title: '季评完成',
        tip: '季评完成',
        value: TRIAL_ACTION.QUARTER_COMPLETE
    },
    // 周评访谈
    {
        title: '面谈准备',
        tip: '面谈准备中',
        icon: 'miantanzhunbei',
        value: TRIAL_ACTION.INTERVIEW_READY_WEEK
    },
    {
        title: '面谈记录',
        status: '面谈待记录',
        tip: '面谈待记录',
        icon: 'miantanjilu',
        value: TRIAL_ACTION.INTERVIEW_LOG_WEEK
    },
    {
        title: '面谈总结',
        status: '面谈待总结',
        tip: '面谈待总结',
        icon: 'miantanzongjie',
        value: TRIAL_ACTION.INTERVIEW_SUMMARY_WEEK
    },
    {
        title: '面谈详情',
        status: '面谈总结完成',
        tip: '面谈总结完成',
        icon: 'miantanxiangqing',
        value: TRIAL_ACTION.INTERVIEW_DETAIL_WEEK
    },
    // 月评访谈
    {
        title: '面谈准备',
        tip: '面谈准备中',
        icon: 'miantanzhunbei',
        value: TRIAL_ACTION.INTERVIEW_READY_MONTH
    },
    {
        title: '面谈记录',
        status: '面谈待记录',
        tip: '面谈待记录',
        icon: 'miantanjilu',
        value: TRIAL_ACTION.INTERVIEW_LOG_MONTH
    },
    {
        title: '面谈总结',
        status: '面谈待总结',
        tip: '面谈待总结',
        icon: 'miantanzongjie',
        value: TRIAL_ACTION.INTERVIEW_SUMMARY_MONTH
    },
    {
        title: '面谈详情',
        status: '面谈总结完成',
        tip: '面谈总结完成',
        icon: 'miantanxiangqing',
        value: TRIAL_ACTION.INTERVIEW_DETAIL_MONTH
    },
    // 季评访谈
    {
        title: '面谈准备',
        tip: '面谈准备中',
        icon: 'miantanzhunbei',
        value: TRIAL_ACTION.INTERVIEW_READY_QUARTER
    },
    {
        title: '面谈记录',
        status: '面谈待记录',
        tip: '面谈待记录',
        icon: 'miantanjilu',
        value: TRIAL_ACTION.INTERVIEW_LOG_QUARTER
    },
    {
        title: '面谈总结',
        status: '面谈待总结',
        tip: '面谈待总结',
        icon: 'miantanzongjie',
        value: TRIAL_ACTION.INTERVIEW_SUMMARY_QUARTER
    },
    {
        title: '面谈详情',
        status: '面谈总结完成',
        tip: '面谈总结完成',
        icon: 'miantanxiangqing',
        value: TRIAL_ACTION.INTERVIEW_DETAIL_QUARTER
    },
    {
        title: '面谈详情',
        status: '试用终止',
        tip: '面谈结论终止试用',
        icon: 'miantanxiangqing',
        value: TRIAL_ACTION.TRIAL_DONE
    },
    {
        title: '试用中',
        status: '试用中',
        value: 'assessing'
    }
];

// 待转正状态
export const INFORMAL_STATUS = {
    APPLY: 'regularApply',
    APPLY2: 'regularApplyAhead',
    APPROVAL: 'regularApproval',
    PASS: 'approvalPass',
    BACK: 'approvalWithdraw',
    REJECT: 'approvalReject'
};

export const INFORMAL_STATUS_LIST = [
    {
        text: '转正待申请',
        tip: '转正待申请',
        value: INFORMAL_STATUS.APPLY,
        value2: INFORMAL_STATUS.APPLY2
    },
    {
        text: '转正审批中',
        tip: '转正审批中',
        value: INFORMAL_STATUS.APPROVAL
    },
    {
        text: '审批通过',
        tip: '审批通过',
        value: INFORMAL_STATUS.PASS
    },
    {
        text: '审批撤回',
        tip: '审批撤回',
        value: INFORMAL_STATUS.BACK
    },
    {
        text: '审批拒绝',
        tip: '审批拒绝',
        color: '#F5222D',
        value: INFORMAL_STATUS.REJECT
    }
];

export const RECORD_STATUS_LIST = [
    {
        text: '转正通过',
        tip: '转正通过',
        value: 'regularPass'
    },
    {
        text: '试用终止',
        tip: '试用终止',
        color: '#F5222D',
        value: TRIAL_ACTION.TRIAL_DONE
    },
    {
        text: '完成试用',
        tip: '完成试用',
        value: 'probationTryComplete'
    }
];

// 面谈类型
export const TALK = {
    TRIAL: 1,
    WEEK: 2,
    MONTH: 3,
    QUARTER: 4,
    AHEAD_FORMAL: 5,
    FORMAL: 6
};

export const TALK_TYPE_LIST = [
    {
        label: '试用反馈面谈',
        value: TALK.TRIAL
    },
    {
        label: '周评面谈',
        value: TALK.WEEK
    },
    {
        label: '月评面谈',
        value: TALK.MONTH
    },
    {
        label: '季评面谈',
        value: TALK.QUARTER
    },
    {
        label: '提前转正评估面谈',
        value: TALK.AHEAD_FORMAL
    },
    {
        label: '转正评估面谈',
        value: TALK.FORMAL
    }
];

// 面谈方式
export const INTERVIEW_WAY = {
    SITE: 1, // 现场
    VIDEO: 2, // 视频
    TEL: 3, // 电话
    WRITTEN: 4, // 笔试
    OTHER: 99 // 其它
};

export const INTERVIEW_LABEL_LIST = ['', '现场', '视频', '电话', '笔试', '其他'];

// 结论
export const CONCLUSION_STATUS_VALUES = {
    CONTINUED: 1,
    EARLY: 2,
    ALLOWABLE: 3,
    TERMINATE: 4,
    INSPECT: 5
};

export const CONCLUSION_STATUS = {
    [CONCLUSION_STATUS_VALUES.CONTINUED]: '继续试用',
    [CONCLUSION_STATUS_VALUES.EARLY]: '提前转正',
    [CONCLUSION_STATUS_VALUES.ALLOWABLE]: '允许转正',
    [CONCLUSION_STATUS_VALUES.TERMINATE]: '终止试用',
    [CONCLUSION_STATUS_VALUES.INSPECT]: '需要观察'
};
